﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tetris.Model
{
    //dobrze by bylo zaimplementowac indekser
    //dobrze by bylo dodac jakies id'ki klockow
    public interface ICollectionModel<T> : IEnumerable<T>
    {
        void Add(T item);
        void Delete(T item);
        void Delete(int index);
        void Delete(Func<T, bool> predicate);
        T Last();
        bool Contains(Func<T, bool> predicate);

        event ElementToCollectionAdded ElementToCollectionAdded;
        event ElementFromCollectionDeleted ElementFromCollectionDeleted;
    }
}
